import request from "@/utils/request";

/**
 * 获取商品列表数据
 * @param params
 * @returns {Promise<unknown>}
 */
export function getGoodsList(params = {}){
  return request({
    url: '/goods/getGoodsList',
    method: 'get',
    params
  })
}

/**
 * 获取商品关联信息
 * @param suitId
 * @returns {Promise | Promise<unknown>}
 */
export function getGoodsSuit(suitId){
  return request({
    url: `/goods/getGoodsSuit/${suitId}`,
    method: 'get',
  });
}

/**
 * 保存商品关联
 * @param data
 * @returns {Promise | Promise<unknown>}
 */
export function saveGoodsSuit(data){
  return request({
    url: `/goods/suitGoods`,
    method: 'post',
    data,
  })
}
